package com.tanglongan.designPattern.dp09_decorator.demo01;

/**
 * 鸡蛋装饰器类
 */
public class EggDecorator extends BattercakeDecorator {

    public EggDecorator(Battercake battercake) {
        super(battercake);
    }

    @Override
    protected void doSomething() {
        System.out.println("加了一个鸡蛋");
    }

    @Override
    protected String getMsg() {
        return super.getMsg() + ">> 1根香肠";
    }

    @Override
    protected int getPrice() {
        return super.getPrice() + 2;
    }

}
